package pri.syl.xiaowu.websocket.core.template.core.factory;

import pri.syl.xiaowu.websocket.annotation.WebsocketRoute;
import pri.syl.xiaowu.websocket.core.template.WebsocketRouteTemplate;

/**
 * @Author YunLong
 * @Date 2021/7/18 18:01
 * @Description 获取注解的url工厂
 **/
public class WebsocketRouteTemplateFactory {
    private WebsocketRouteTemplateFactory() {
    }

    /**
     * 获取注解对应的value
     *
     * @param routeTemplate
     * @return java.lang.String
     * @apiNote [附加描述]
     * @author YunLong
     * @date 2021/7/19 9:24
     */
    public static String getRoute(WebsocketRouteTemplate routeTemplate) {
        return routeTemplate.getClass().getAnnotation(WebsocketRoute.class).value();
    }
}
